<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>vue的列表展示</title>
</head>

<body>

  <div id="app">
    <!-- {{ movies }} -->
    <!-- 1. 原始写法 -->
    <ul>
      <li>{{ movies[0] }}</li>
      <li>{{ movies[1] }}</li>
      <li>{{ movies[2] }}</li>
      <li>{{ movies[3] }}</li>
    </ul>

    <!-- 2. v-for 语法，用于遍历循环 -->
    <ul>
      <li v-for="item in movies">{{ item }}</li>
    </ul>
  </div>

  <script src="../../js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        movies: [
          '星际穿越',
          '大话西游',
          '盗梦空间',
          '二十不惑',
          '三十而已'
        ]
      }
    })
  </script>
</body>

</html>